package cn.gjxblog.common.utils.captcha;

import com.google.code.kaptcha.Producer;
import com.google.code.kaptcha.impl.DefaultKaptcha;

import java.awt.image.BufferedImage;

/**
 * @Author guojiaxun
 * @Date 2019/9/19 9:24
 */
public class GoogleCaptchaUtils {
    private static  Producer producer = new DefaultKaptcha();

    public static String createText(){
       return producer.createText();
    }

    public static BufferedImage creteImage(String code){
        BufferedImage image = producer.createImage(code);
        return image;
    }


}
